﻿<UserControl x:Class="ErikEJ.SqlCeToolbox.ToolWindows.ExplorerControl"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	  Loaded="MyToolWindow_Loaded" KeyDown="ExplorerControl_OnPreviewKeyDown">

    <Grid Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="28"  />
            <RowDefinition  />
        </Grid.RowDefinitions>

        <ToolBar Name="explorerToolbar" Grid.Row="0">
            <Button Name="Refresh" Click="ToolbarRefresh_Click" ToolTip="Refresh" >
                <Image Height="20" Width="20" Source="../Resources/refresh.png" />
            </Button>
            <Button Name="Options" Click="Options_Click"  ToolTip="Options" >
                <Image Height="20" Width="20" Source="../Resources/propes.png" />
            </Button>
            <Separator />
            <Button Name="About" Click="ToolbarAbout_Click" ToolTip="About" >
                <Image Height="20" Width="20" Source="../Resources/help_about.png" />
            </Button>
            <Button Name="Updated" Click="Update_Click" ToolTip="Update available!">
                <TextBlock Name="UpdatedText" FontWeight="DemiBold" Foreground="Red">Updated!</TextBlock>
            </Button>
        </ToolBar>

        <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" Name="scrollViewer">
            <TreeView Name="TreeView1" HorizontalAlignment="Left" VerticalAlignment="Top"  Width="Auto" Background="#FFFFFFFF" BorderBrush="#FFFFFFFF" Foreground="#FFFFFFFF" >
                <TreeView.Resources>
                    <Style TargetType="TreeViewItem">
                        <EventSetter Event="MouseRightButtonDown" Handler="TreeViewItem_MouseRightButtonDown">
                        </EventSetter>
                    </Style>
                </TreeView.Resources>
                <TreeViewItem Name="ItemDatabases" >
                    <TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="../Resources/databases.PNG" Height="16" Width="16"></Image>
                            <TextBlock Name="txtConnections" Padding="3" Text="SQL Server Compact Data Connections"></TextBlock>
                        </StackPanel>
                    </TreeViewItem.Header>
                </TreeViewItem>
            </TreeView>
        </ScrollViewer>
    </Grid>
</UserControl>
